import { getAll as getAllRole } from "@/api/system/role";
import { getAll as getDepartment } from "@/api/system/department";

interface Dic {
  value: string;
  label: string;
}
var roleData: Array<Dic> = [];
var departmentData: Array<Dic> = [];
const radioData = [
  { value: 0, label: "禁用" },
  { value: 1, label: "启用" },
];

getAllRole().then((res) => {
  roleData = res.data.map((e: any) => {
    return {
      value: e.role_Id,
      label: e.roleName,
    };
  });
});
getDepartment().then((res) => {
  departmentData = res.data.map((e: any) => {
    return {
      value: e.department_Id,
      label: e.departmentName,
    };
  });
});

export { roleData, departmentData, radioData };
